package com.demo.jetpack

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.demo.jetpack.databinding.BFragmentBinding

class BFragment: Fragment() {

    private val mViewBinding by lazy {
        BFragmentBinding.inflate(layoutInflater)
    }

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        val args = BFragmentArgs.fromBundle(requireArguments())
        Toast.makeText(requireContext(), args.user?.username, Toast.LENGTH_SHORT).show()
        return mViewBinding.root
    }

}